<template>
	<view class="content">
		<image v-bind:class="className" src="/static/logo.png"></image>
			<view class="text-area">
				<text class="title" v-on:click="open">{{title}}</text>
			</view>
		<view>
			<view>{{number + 1}}</view>
			<view>{{ok ? 'YES' : 'NO'}}</view>
			<view>{{message.split('').reverse().join('')}}</view>
		</view>
		<view class="input">
			<input v-model="message" placeholder="edit me"/>
			<text>Messge is:{{message}}</text>
			<view class="content">
				<view>
					<view v-if="!raining">今天天气好</view>
					<view v-if="raining">今天天不好</view>
					<view v-if="state==='vue'">state的值是Vue</view>
					<view >State is {{state?'vue':'App'}}</view>
					<view>
						<view v-if="state==='vue'">nui-app</view>
						<view v-else-if="state==='html'">HTML</view>
						<view v-else>APP</view>
					</view>
				</view>
				<view v-for="item in arr" style="color:red;">{{item}}</view>
				<view v-for="(item,index) in 4" style="color: red;">
					<view :class="'list' + index%2">{{inde%2}}</view>
					<view v-for="(value,name,index) in object">
						{{index}},{{name}},{{value}}
					</view>
					<view v-for="item in arr" :Key="item.id">
					                <view style="color: blue;">{{item.id}}:{{item.name}}</view>
				 </view>
				</view>
			</view>
		</view>
		
	</view >
</template>

<script>
	export default {
		data() {
			return {
				title:'Hello',
				number: 1,
				ok: true,
				message: 'Hello Vue',
				className:"smalllogo",
				message:"",
				raining:false,
				state:'vue',
				 arr:[
					 {id:1,name:'uni-app'},
					 {id:2,name:'html'}, 
				                ],
				 Object:{
				       title:'how to do lists in vue',
				        authoe: 'jane doe',
				        publishedAt: '2025-10-14'
				                }
				
			}
		},
		methods: {
			open(){
				this.title = "opening a new Page";
				this.className = 'long'
			}
		}
	}
</script>

<style>

</style>
